*---------------------------------------------
* exemptions2018.do
* Author-constructed variable for state/federal minimum wage exemptions, 2018
* Source: VitalLaw state minimum wage law summaries
*---------------------------------------------

* Initialize variable
gen exemptions2018 = 0

* State-specific exemptions			
replace exemptions2018=1 if 	statefip==	2	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	2	 & 	(cow1==24 | cow1==25 | cow1==26 | cow1==27 | cow1==28)
replace exemptions2018=1 if 	statefip==	2	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	2	 & 	age < 18 & (hoursu1 < 30 | hoursuorg < 30)
replace exemptions2018=1 if 	statefip==	2	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	2	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	2	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	2	 & 	occ10==9140
replace exemptions2018=1 if 	statefip==	1	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	1	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	1	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	1	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	1	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	1	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	1	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	1	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	1	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	1	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	1	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	1	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	1	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	1	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	1	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	1	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	1	 & 	((hoursu1<8 | hoursuorg <8) | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	5	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	5	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	5	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	5	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	5	 & 	cow1==25
replace exemptions2018=1 if 	statefip==	5	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	5	 & 	dind03==50 & occ10==4600 & ((hoursu1<8 | hoursuorg <8) | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	4	 & 	dind03==50 & occ10==4600 & ((hoursu1<8 | hoursuorg <8) | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	6	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	8	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	8	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	8	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	8	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	8	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	8	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	8	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	8	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	8	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	8	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	8	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	8	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	8	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	8	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	8	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	8	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	8	 & 	((hoursu1<8 | hoursuorg <8) | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	9	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	9	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	9	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	9	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	9	 & 	cow1==25
replace exemptions2018=1 if 	statefip==	11	 & 	dind03==50 & occ10==4600 & ((hoursu1<8 | hoursuorg <8) | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	10	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	10	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	10	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	10	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	10	 & 	cow1==25
replace exemptions2018=1 if 	statefip==	10	 & 	dind03==1
replace exemptions2018=1 if 	statefip==	10	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	10	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	12	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	12	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	12	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	12	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	12	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	12	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	12	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	12	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	12	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	12	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	12	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	12	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	12	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	12	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	12	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	12	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	12	 & 	((hoursu1<8 | hoursuorg <8) | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	13	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	13	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	13	 & 	occ10==6050
replace exemptions2018=1 if 	statefip==	15	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	15	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	15	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	15	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	15	 & 	cow1 >= 25 & cow1 <= 28
replace exemptions2018=1 if 	statefip==	15	 & 	paidhre==1 & weekpay_noadj >= 500
replace exemptions2018=1 if 	statefip==	15	 & 	dind03==50 & ((hoursu1<8 | hoursuorg <8) | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	15	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	16	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	16	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	16	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	16	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	16	 & 	age < 16 & (hoursu1<20 | hoursuorg <20)
replace exemptions2018=1 if 	statefip==	16	 & 	cow1 >= 25 & cow1 <= 28
replace exemptions2018=1 if 	statefip==	16	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	17	 & 	(occ10==2040 | occ10==2050 | occ10==2060)
replace exemptions2018=1 if 	statefip==	17	 & 	docc03==16 & occ10==4950
replace exemptions2018=1 if 	statefip==	17	 & 	dind03==23 & occ10==9130
replace exemptions2018=1 if 	statefip==	18	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	18	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	18	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	18	 & 	(occ10==2040 | occ10==2050 | occ10==2060)
replace exemptions2018=1 if 	statefip==	18	 & 	age < 16
replace exemptions2018=1 if 	statefip==	18	 & 	docc03==16 & occ10 == 4950
replace exemptions2018=1 if 	statefip==	18	 & 	dind03==1 & (occ10 == 6040 | occ10 == 6050 | occ10 == 9130 | occ10 == 9150)
replace exemptions2018=1 if 	statefip==	18	 & 	dind03==23 & occ10==9130
replace exemptions2018=1 if 	statefip==	18	 & 	occ10==4810
replace exemptions2018=1 if 	statefip==	20	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	20	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	20	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	20	 & 	age <= 18 & (hoursu1<40 | hoursuorg <40)
replace exemptions2018=1 if 	statefip==	20	 & 	cow1 == 25 | cow1 == 26
replace exemptions2018=1 if 	statefip==	20	 & 	dind03==1
replace exemptions2018=1 if 	statefip==	20	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	20	 & 	occ10 == 4950
replace exemptions2018=1 if 	statefip==	21	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	21	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	21	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	21	 & 	cow1 == 25 | cow1 == 26
replace exemptions2018=1 if 	statefip==	21	 & 	cow1 == 27 & (occ10== 3400 | occ10==3740 | occ10==3930)
replace exemptions2018=1 if 	statefip==	21	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	21	 & 	dind03==1
replace exemptions2018=1 if 	statefip==	21	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	21	 & 	dind03==50 & occ10==4600 & ((hoursu1<8 | hoursuorg <8) | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	21	 & 	occ10 == 4951
replace exemptions2018=1 if 	statefip==	21	 & 	occ10 == 4952
replace exemptions2018=1 if 	statefip==	22	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	22	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	22	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	22	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	22	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	22	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	22	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	22	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	22	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	22	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	22	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	22	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	22	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	22	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	22	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	22	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	22	 & 	((hoursu1<8 | hoursuorg <8) | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	25	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	25	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	25	 & 	dind03==1
replace exemptions2018=1 if 	statefip==	25	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	24	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	24	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	24	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	24	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	24	 & 	age < 16 & (hoursu1<20 | hoursuorg <20)
replace exemptions2018=1 if 	statefip==	23	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	23	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	23	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=577 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	23	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=577 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	23	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=577 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	23	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	23	 & 	occ10==9140
replace exemptions2018=1 if 	statefip==	26	 & 	age < 18
replace exemptions2018=1 if 	statefip==	26	 & 	hoursu1 <= 20 | hoursuorg <20
replace exemptions2018=1 if 	statefip==	26	 & 	((hoursu1<8 | hoursuorg <8) | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	27	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	27	 & 	(cow1 >= 25 & cow1 <= 28) & (occ10==1640 | occ10== 6120)
replace exemptions2018=1 if 	statefip==	27	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	27	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	27	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	27	 & 	(occ10==2040 | occ10==2050 | occ10==2060)
replace exemptions2018=1 if 	statefip==	27	 & 	indcode==1 & weekpay_noadj>709.28 & paidhre==1
replace exemptions2018=1 if 	statefip==	27	 & 	dind03==23 & occ10==9130
replace exemptions2018=1 if 	statefip==	27	 & 	dind03==50 & occ10==4600 & ((hoursu1<8 | hoursuorg <8) | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	27	 & 	occ10 == 3740 | occ10 == 3820
replace exemptions2018=1 if 	statefip==	27	 & 	occ10 == 9140
replace exemptions2018=1 if 	statefip==	27	 & 	occ10 == 9300 | occ10 == 9310
replace exemptions2018=1 if 	statefip==	29	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	29	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	29	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	29	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	29	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	29	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	29	 & 	dind03==50 & occ10==4600 & ((hoursu1<8 | hoursuorg <8) | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	29	 & 	dind03==50 & (hoursu1<=6 | hoursuorg <=6)
replace exemptions2018=1 if 	statefip==	29	 & 	occ10==6740 | occ10==9230 | occ10==9240
replace exemptions2018=1 if 	statefip==	28	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	28	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	28	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	28	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	28	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	28	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	28	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	28	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	28	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	28	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	28	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	28	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	28	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	28	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	28	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	28	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	28	 & 	((hoursu1<8 | hoursuorg <8) | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	30	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	30	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	30	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	30	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	30	 & 	cow1 == 25 | cow1 == 26
replace exemptions2018=1 if 	statefip==	30	 & 	dind03==50 & (occ10==4600 | occ10== 4230 | occ10 == 4250 | occ10 == 4140)
replace exemptions2018=1 if 	statefip==	30	 & 	dind03==50 & occ10==4600
replace exemptions2018=1 if 	statefip==	30	 & 	occ10==4920 | occ10==4950
replace exemptions2018=1 if 	statefip==	37	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	37	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	37	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	37	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	37	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	37	 & 	age <=18 & docc03 == 9 & (occ10 == 2700 | occ10 == 4900)
replace exemptions2018=1 if 	statefip==	37	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	37	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	38	 & 	dind03 == 26 & occ10 == 2700
replace exemptions2018=1 if 	statefip==	38	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	38	 & 	occ10 == 3740 | occ10 == 3820
replace exemptions2018=1 if 	statefip==	31	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	31	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	31	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	31	 & 	cow1 >= 25 & cow1 <= 28
replace exemptions2018=1 if 	statefip==	31	 & 	dind03==1
replace exemptions2018=1 if 	statefip==	31	 & 	dind03==50 & occ10==4600 & ((hoursu1<8 | hoursuorg <8) | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	31	 & 	(occ10 == 3700 | occ10 ==3710 | occ10 == 3720 | occ10 == 3730 | occ10 == 4010 | occ10 == 4200 | occ10 == 4210 | occ10 == 4300 | occ10 == 4320 | occ10 == 4700 | occ10 == 5000 | occ10 == 6005 | occ10 == 6200 | occ10 == 7000 | occ10 == 7700 | occ10 == 9000)
replace exemptions2018=1 if 	statefip==	33	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	33	 & 	age <= 16
replace exemptions2018=1 if 	statefip==	33	 & 	dind03==1
replace exemptions2018=1 if 	statefip==	33	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	33	 & 	occ10==4920 | occ10==4950 | occ10==810
replace exemptions2018=1 if 	statefip==	34	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	34	 & 	dind03==50 & occ10==4600 & (hoursu1<20 | hoursuorg <20)
replace exemptions2018=1 if 	statefip==	35	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	35	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	35	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	35	 & 	(occ10 == 3700 | occ10 ==3710 | occ10 == 3720 | occ10 == 3730 | occ10 == 4010 | occ10 == 4200 | occ10 == 4210 | occ10 == 4300 | occ10 == 4320 | occ10 == 4700 | occ10 == 5000 | occ10 == 6005 | occ10 == 6200 | occ10 == 7000 | occ10 == 7700 | occ10 == 9000)
replace exemptions2018=1 if 	statefip==	35	 & 	age <= 18 & educ < 73
replace exemptions2018=1 if 	statefip==	35	 & 	age <= 18 & schenrl == 5
replace exemptions2018=1 if 	statefip==	35	 & 	dind03==1 & (occ10 == 6040 | occ10 == 9640)
replace exemptions2018=1 if 	statefip==	35	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	32	 & 	age < 18
replace exemptions2018=1 if 	statefip==	36	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	36	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	36	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	36	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	36	 & 	cow1 >= 25 & cow1 <= 28
replace exemptions2018=1 if 	statefip==	36	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	36	 & 	dind03==50 & occ10==4600 & (hoursu1<8 | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	36	 & 	occ10 == 9140
replace exemptions2018=1 if 	statefip==	36	 & 	occ10==2040
replace exemptions2018=1 if 	statefip==	39	 & 	dind03==50 & (hoursu1<8 | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	40	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	40	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	40	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	40	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	40	 & 	age < 18 & educ < 73
replace exemptions2018=1 if 	statefip==	40	 & 	age < 18 & educ < 73
replace exemptions2018=1 if 	statefip==	40	 & 	age < 22 & (schenrl >= 1 & schenrl <= 4)
replace exemptions2018=1 if 	statefip==	40	 & 	age < 22 & (schenrl >= 1 & schenrl <= 4)
replace exemptions2018=1 if 	statefip==	40	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	40	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	40	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	40	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	40	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	40	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	40	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	40	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	40	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	40	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	40	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	40	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	40	 & 	(hoursu1<8 | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	40	 & 	cow1 == 25 | cow1 == 26
replace exemptions2018=1 if 	statefip==	40	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	40	 & 	dind03==1
replace exemptions2018=1 if 	statefip==	40	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	40	 & 	occ10==6740 | occ10==9230 | occ10==9240
replace exemptions2018=1 if 	statefip==	40	 & 	hoursu1 < 25 | hoursuorg<25
replace exemptions2018=1 if 	statefip==	41	 & 	((docc03==16) & (occ10==4950)) | occ10==9140
replace exemptions2018=1 if 	statefip==	41	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	41	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	41	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	41	 & 	cow1 == 25 | cow1 == 26
replace exemptions2018=1 if 	statefip==	41	 & 	indcode == 7860 & (schenrl == 1 | schenrl == 2)
replace exemptions2018=1 if 	statefip==	41	 & 	dind03==50 & occ10==4600
replace exemptions2018=1 if 	statefip==	41	 & 	dind03==50 & (hoursu1<8 | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	42	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	42	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	42	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	42	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	42	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	42	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	42	 & 	occ10 == 6050
replace exemptions2018=1 if 	statefip==	44	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	44	 & 	cow1 == 25 | cow1 == 26
replace exemptions2018=1 if 	statefip==	44	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	44	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	45	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	45	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	45	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	45	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	45	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	45	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	45	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	45	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	45	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	45	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	45	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	45	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	45	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	45	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	45	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	45	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	45	 & 	(hoursu1<8 | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	46	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	46	 & 	dind03==50 & occ10==4600 & (hoursu1<8 | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	47	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	47	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	47	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	47	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	47	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	47	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	47	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	47	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	47	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	47	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	47	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	47	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	47	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	47	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	47	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	47	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	47	 & 	(hoursu1<8 | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	48	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	48	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	48	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	48	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	48	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	48	 & 	occ10==2040
replace exemptions2018=1 if 	statefip==	48	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	48	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	48	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	48	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	48	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	48	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	48	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	48	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	48	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	48	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	48	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	48	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	48	 & 	(hoursu1<8 | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	49	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	49	 & 	cow1 == 25 | cow1 == 26
replace exemptions2018=1 if 	statefip==	49	 & 	dind03==50 & (hoursu1<8 | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	49	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	49	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	49	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	49	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	49	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	49	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	49	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	49	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	49	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	49	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	49	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	49	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	49	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	49	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	49	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	49	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	49	 & 	(hoursu1<8 | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	51	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	51	 & 	age < 16
replace exemptions2018=1 if 	statefip==	51	 & 	dind03 == 1 & (occ10 == 205 | occ10 == 6005 | occ10 == 6050)
replace exemptions2018=1 if 	statefip==	51	 & 	dind03==50 & occ10==4600 & (hoursu1<8 | hoursuorg<8)
replace exemptions2018=1 if 	statefip==	51	 & 	occ10 == 9140
replace exemptions2018=1 if 	statefip==	51	 & 	schenrl >= 1 & schenrl <= 4
replace exemptions2018=1 if 	statefip==	50	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	50	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	50	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	50	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	50	 & 	(schenrl >= 1 & schenrl <= 4) & nilf == 0
replace exemptions2018=1 if 	statefip==	50	 & 	cow1 == 25 | cow1 == 26
replace exemptions2018=1 if 	statefip==	50	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	50	 & 	dind03==1
replace exemptions2018=1 if 	statefip==	50	 & 	dind03==50
replace exemptions2018=1 if 	statefip==	50	 & 	occ10 == 9140
replace exemptions2018=1 if 	statefip==	53	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	53	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	53	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	53	 & 	cow1 == 27 | cow1 == 28
replace exemptions2018=1 if 	statefip==	53	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	53	 & 	dind03==23 & occ10==9130
replace exemptions2018=1 if 	statefip==	53	 & 	dind03==50 & (hoursu1<8 | hoursuorg <8)
replace exemptions2018=1 if 	statefip==	53	 & 	occ10==6120
replace exemptions2018=1 if 	statefip==	55	 & 	(occ10 == 4750 | occ10 == 4760 | occ10 == 4800 | occ10 == 4810 | occ10 == 4820 | occ10 == 4840 | occ10 == 4850 | occ10 == 4920 | occ10 == 4950)
replace exemptions2018=1 if 	statefip==	55	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	55	 & 	dind03==50 & (hoursu1 < 15 | hoursuorg<15)
replace exemptions2018=1 if 	statefip==	55	 & 	((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	55	 & 	((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	55	 & 	((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	55	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 	statefip==	55	 & 	(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	55	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	55	 & 	(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 	statefip==	55	 & 	(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 	statefip==	55	 & 	(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 	statefip==	55	 & 	(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 	statefip==	55	 & 	cow1==25 & (occ10==3820)
replace exemptions2018=1 if 	statefip==	55	 & 	docc03==9 & occ10==4950 
replace exemptions2018=1 if 	statefip==	55	 & 	educ>=122  & (occ10==1720)
replace exemptions2018=1 if 	statefip==	55	 & 	occ10==2040 
replace exemptions2018=1 if 	statefip==	55	 & 	occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 	statefip==	55	 & 	occ10==5010 
replace exemptions2018=1 if 	statefip==	55	 & 	(hoursu1<8 | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
replace exemptions2018=1 if 	statefip==	54	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	54	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	54	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	54	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	54	 & 	(ftptstat>=6 & ftptstat<=9) & (schenrl >= 1 & schenrl <= 4)
replace exemptions2018=1 if 	statefip==	54	 & 	cow1 == 25 | cow1 == 26
replace exemptions2018=1 if 	statefip==	54	 & 	dind03==23 & (occ10==9240 | occ10==9130 | occ10==9030 | occ10==9310)
replace exemptions2018=1 if 	statefip==	54	 & 	occ10==3740
replace exemptions2018=1 if 	statefip==	56	 & 	((educ>=122 & paidhre==1 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 	statefip==	56	 & 	(docc03==1 & paidhre==1 & year<2020) | (docc03==1 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	56	 & 	(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 	statefip==	56	 & 	(docc03==17 & paidhre==1 & year<2020) | (docc03==17 & paidhre==1 & year>=2020)
replace exemptions2018=1 if 	statefip==	56	 & 	cow1 >= 25 & cow1 <= 28
replace exemptions2018=1 if 	statefip==	56	 & 	dind03==1
replace exemptions2018=1 if 	statefip==	56	 & 	dind03==50

* FLSA exemptions
replace exemptions2018=1 if 				((docc03==3) & paidhre==1 & wageotc_noadj>=27.63) | ((docc03==3) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((docc03==3) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 				((educ>=122 & paidhre==1 & weekpay_noadj>=455 & year<2020) & (docc03==7 | docc03==10 | occ10==800 | occ10==5120 | occ10==1200 | docc03==4 |  docc03==8 | docc03==5 | occcode==3050)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & year<2020) 
replace exemptions2018=1 if 				((dind03==32) & paidhre==1 & weekpay_noadj>=455 & year<2020) | ((dind03==32) & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 				(docc03==1 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 				(docc03==17 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (docc03==17 & paidhre==1 & weekpay_noadj>=684 & year>=2020)
replace exemptions2018=1 if 				(docc03==1 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==1 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) |  (docc03==17 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==4920 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (occ10==410 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020) | (educ>=122 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020 &  (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (educ>=122 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020 & (docc03==7 | docc03==10 | docc03==4 | docc03==8 | docc03==5 | occ10==800 | occ10==1200 | occ10==3050 | occ10==2040)) | (docc03==9 & paidhre==1 & weekpay_noadj>=455 & (weekpay_noadj*52>100000) & year<2020) | (docc03==9 & paidhre==1 & weekpay_noadj>=684 & (weekpay_noadj*52>107432) & year>=2020)
replace exemptions2018=1 if 				(docc03==16) & (occ10==4950)
replace exemptions2018=1 if 				(dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=455 & year<2020) | (dind03==33 & docc03==2 & paidhre==1 & weekpay_noadj>=684 & year>=2020) | occ10==4810
replace exemptions2018=1 if 				(occ10==4920 & paidhre==1) | (occ10==410 & paidhre==1)
replace exemptions2018=1 if 				(occ10==9300 | occ10==9310)
replace exemptions2018=1 if 				cow1==25 & (occ10==3820)
replace exemptions2018=1 if 				docc03==9 & occ10==4950 
replace exemptions2018=1 if 				educ>=122  & (occ10==1720)
replace exemptions2018=1 if 				occ10==2040 
replace exemptions2018=1 if 				occ10==3830 | occ10==6000 | occ10==6100 | occ10==6005
replace exemptions2018=1 if 				occ10==5010 
replace exemptions2018=1 if 				(hoursu1<8 | hoursuorg <8) & (dind03==50 | dind03==48) & (occ10==4020 | occ10==4230 | occ10==4600)
